<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:animateLayoutChanges="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.google.android.material.button.MaterialButtonToggleGroup
        android:id="@+id/toggleButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:checkedButton="@+id/tomorrowButton"
        app:layout_constraintBottom_toTopOf="@+id/miniDiaryCard"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:selectionRequired="true"
        app:singleSelection="true">

        <Button
            android:id="@+id/todayButton"
            style="?attr/materialButtonOutlinedStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/today" />

        <Button
            android:id="@+id/tomorrowButton"
            style="?attr/materialButtonOutlinedStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/tomorrow" />
    </com.google.android.material.button.MaterialButtonToggleGroup>


    <com.google.android.material.card.MaterialCardView
        android:id="@+id/miniDiaryCard"
        android:layout_width="match_parent"
        android:layout_margin="@dimen/dashboard_mark_recycler_margin"
        android:layout_height="@dimen/dashboard_mini_diary_max_height"
        app:layout_constraintBottom_toTopOf="@+id/dashboardMarkRecyclerView"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <TextView
            android:id="@+id/free_day"
            style="@style/TextAppearance.Material3.HeadlineMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="@string/free_day"
            android:visibility="gone" />

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fadeScrollbars="false"
            android:scrollbars="vertical">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/miniDiaryRecyclerView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                tools:itemCount="3"
                tools:listitem="@layout/item_lessons_recycler" />
        </androidx.core.widget.NestedScrollView>
    </com.google.android.material.card.MaterialCardView>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/dashboardMarkRecyclerView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/dashboard_mark_recycler_margin"
        app:layout_constraintBottom_toTopOf="@+id/rating_card"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        tools:itemCount="1"
        tools:listitem="@layout/item_dashboard_mark" />


    <com.google.android.material.card.MaterialCardView
        android:id="@+id/rating_card"
        style="@style/Widget.Material3.CardView.Filled"
        android:layout_width="match_parent"
        android:layout_height="@dimen/rating_card_height"
        android:layout_margin="@dimen/rating_card_margin"
        android:clickable="true"
        android:focusable="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:id="@+id/rating_background"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:alpha=".3"
                android:contentDescription="@string/content_rating_card_background"
                android:scaleType="centerCrop"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:srcCompat="@tools:sample/backgrounds/scenic" />

            <TextView
                android:id="@+id/rating_status"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/rating_card_margin"
                android:text="@string/placeholder_rating"
                android:textSize="@dimen/rating_place_text_size"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/rating_button"
                style="@style/Widget.Material3.Button.IconButton"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/goto_rating_layout_height"
                android:layout_marginEnd="@dimen/goto_rating_margin_end"
                android:contentDescription="@string/content_show_rating"
                android:insetLeft="0dp"
                android:insetTop="0dp"
                android:insetRight="0dp"
                android:insetBottom="0dp"
                app:icon="@drawable/ic_round_filter_list_24"
                app:iconPadding="0dp"
                app:iconSize="@dimen/goto_rating_size"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent">

            </com.google.android.material.button.MaterialButton>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </com.google.android.material.card.MaterialCardView>

</androidx.constraintlayout.widget.ConstraintLayout>